package com.woate.wingframework.persistent.api.handler;

import com.woate.wingframework.persistent.api.exceptions.PersistentException;

import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

public interface TypeHandler<T> {

    void setParameter(PreparedStatement ps, int i, T parameter, JdbcType jdbcType) throws PersistentException;

    T getResult(ResultSet rs, String columnName) throws PersistentException;

    T getResult(ResultSet rs, int columnIndex) throws PersistentException;

    T getResult(CallableStatement cs, int columnIndex) throws PersistentException;

}
